package com.zc.springboot0506.controller.renpf.service.impl;

import com.zc.springboot0506.controller.renpf.dao.UsersDao;
import com.zc.springboot0506.controller.renpf.pojo.User;
import com.zc.springboot0506.controller.renpf.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @create: 2021/6/24
 * @author: Tony Stark
 */
@Service("usersService")
public class UsersServiceImpl implements UsersService {
    @Autowired
    UsersDao usersDao;
    @Override
    public List<User> queryUserList() {
        return usersDao.queryUserList();
    }

    @Override
    public User queryById(int id) {
        return usersDao.queryById(id);
    }

    @Override
    public int addUser(User user) {
        return usersDao.addUser(user);
    }

    @Override
    public int updateUser(User user) {
        return usersDao.updateUser(user);
    }

    @Override
    public int deleteUser(int id) {
        return usersDao.deleteUser(id);
    }
}
